package com.atguigu.controller;

import cn.hutool.core.util.IdUtil;
import com.atguigu.aoppreview.PayService;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.boot.SpringBootVersion;
import org.springframework.core.SpringVersion;
import org.springframework.web.bind.annotation.GetMapping;
import org.springframework.web.bind.annotation.RestController;

/**
 * @Author: shenhao
 * @CreatTime: 2024/11/3 15:18
 * @Version: 1.0
 */
@RestController
public class PayAopReviewController {
    @Autowired
    private PayService payService;

    @GetMapping("/pay/aop")
    public String payAop() {
        System.out.println("SpringVersion:"+ SpringVersion.getVersion()+"/t"+"SpringBootVersion: "+ SpringBootVersion.getVersion());
        payService.pay();
        return "success"+ IdUtil.simpleUUID();
    }
}
